package com.shu.controller;

import com.shu.utils.PagingUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author shu
 * @date 2021/3/23
 */

/**
 * 视图跳转控制器
 */
@Controller
@RequestMapping("/view")
public class ViewController {


    @Autowired
   PagingUtils pagingUtils;


    /**
     * 政务
     * @param tid
     * @param pages
     * @param model
     * @return
     */
    @RequestMapping("/zw/{tid}")
    public String view_zw(@PathVariable("tid") Integer tid, Integer pages, Model model){
       pagingUtils.Pages(tid, pages, model);
        return "server";
    }


    /**
     * 营商
     * @param tid
     * @param pages
     * @param model
     * @return
     */
    @RequestMapping("/ys/{tid}")
    public String view_ys(@PathVariable("tid") Integer tid, Integer pages, Model model){
        pagingUtils.Pages(tid, pages, model);
        return "business";

    }


    /**
     * 政策
     * @param tid
     * @param pages
     * @param model
     * @return
     */
    @RequestMapping("/zc/{tid}")
    public String view_zc(@PathVariable("tid") Integer tid, Integer pages, Model model){
        pagingUtils.Pages(tid, pages, model);
        return "projects";
    }


    /**
     * 产业
     * @param tid
     * @param pages
     * @param model
     * @return
     */
    @RequestMapping("/ce/{tid}")
    public String view_ce(@PathVariable("tid") Integer tid, Integer pages, Model model){
        pagingUtils.Pages(tid, pages, model);
        return "pricing";
    }


    /**
     * 要闻
     * @param tid
     * @param pages
     * @param model
     * @return
     */
    @RequestMapping("/yw/{tid}")
    public String view_yw(@PathVariable("tid") Integer tid, Integer pages, Model model){
        pagingUtils.Pages(tid, pages, model);
        return "contact";
    }





}
